package edu.ccit.shudong.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import edu.ccit.shudong.entity.User;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;

@Data
public class UserProfileDTO {
    private Long id;
    private String username;
    private String avatar;
    private String birthday;
    private String phone;
    private String email;
    private String role;

    public void fromUser(User user) {
        this.setId(user.getId());
        this.setUsername(user.getUsername());
        this.setAvatar(user.getAvatar());

    }
}
